// https://leetcode.cn/problems/find-the-difference/
// Created by ade on 2022/8/4.
//

class Solution {
public:
    char findTheDifference(string s, string t) {
        sort(s.begin(), s.end());
        sort(t.begin(), t.end());
        for(int i = 0; i < s.size(); i++){
            if(s[i] != t[i]) return t[i];
        }
        return t[s.size()];

        // int sum1 = 0, sum2 = 0;
        // for(auto i : s) sum1 += i;
        // for(auto i : t) sum2 += i;
        // return 'a' + sum2 - sum1 - 97;
    }
};